Wrapping encode fn in a class makes it work in PHP! Passes one simple test
Added more tests for decoding. A bit of a pain to explicitly write BSON...so hopefully encoding works soon :-)
Merge with gh7-mongotests