Enhancements to the API

This pull request adds enhancements to the API which I need for my Go wrapper: https://github.com/tecbot/gorocksdb

Please review careful the part for the merge operator because I am not a C expert so maybe I have made something wrong.

I completed the CLA.