New robot state to (file) stream conversion functions

Allows to easily export a robot state to a stream for debugging, logging, testing, etc. Intended to be used for saving for file. Also allows you to order the joint output to a custom ordering based on joint model groups (planning groups). Finally, I clarified documentation. 

Does not change any behavior but only adds new.