EJSON Improvements

Here are the most straightforward changes of #1734:
* test for custom types
* fixing equals asymmetry
* provide default clone
* provide default equals