Rolling buffer for ROSBAG

I needed to have a rolling buffer of messages that I could dump after I saw an error occur.
It seems that having this functionality in vanilla rosbag would be quite useful, so I'm submitting a pull request to discuss it.