Expose generic {de,}serialization functions

- Genereic serialization/deserialization functions are exposed. They are useful for example for writing Binary instance for types parametric in vector type. 

- More generic functions are added. They allow to choose how to serialize length of vector and vector's element. 

- Benchmarks are added.