use _check_db() to set the DB as well to reduce duplicate code
support single scalar input for del_doc, get_doc, copy_doc and head_doc
make sure things don't break horribly when input  is not a hashref, instead return with an error
DO NOT modify incoming doc! we are passed a hashref, which means we must be careful, so don't delete doc->_id instead update its _rev for convenience
don't try to delete a non-existing doc or if the ID is missing
set default content-type for put_file to text/plain to enforce correct behaviour. suggestions for a better default welcome
changed update_doc
use Data::Printer to debug print payload and response