Routines to serialize commands to send to MPD, and to deserialize strings returned from MPD.