Common functions for run-length encoded vectors

WWW: https://github.com/statnet/rle
