librados c api for object operations and a few bug fixes

This addresses all the comments from https://github.com/ceph/ceph/pull/1195
and adds the final pieces for return value handling.

It passes the librados tests and the cls tests.