mds: Add encode/decode/dump for use with dencoder

This is for the MDSTable subclasses: AnchorServer,
SnapServer, InoTable.  AnchorServer was partially there
but didn't work in practice dumped objects because of
the version prefix on the object.

Signed-off-by: John Spray <john.spray@inktank.com>
osdc/Journaler: Inline dump_ceph_file_layout

This ideally would have been a method on ceph_file_layout
but it's a C struct in ceph_fs.h.

Signed-off-by: John Spray <john.spray@inktank.com>
mds: Make MDSTable.encode_server_state const

Removes some places in encode() methods where we were
const casting it anyway.

Signed-off-by: John Spray <john.spray@inktank.com>
mds: Make MDSTable debug cope with mds=NULL

This is to ensure that MDSTable instances constructed
using a default constructor don't barf on debug prints.

Signed-off-by: John Spray <john.spray@inktank.com>
dencoder: Apply 'skip' in buffer instead of file

This obviates the need to modify read_file, keeps
the change local to dencoder.

Signed-off-by: John Spray <john.spray@inktank.com>