Support $meta documents in Cursor::sort()

Fixed the casting as mentioned in https://github.com/doctrine/mongodb/issues/152#issuecomment-57297661

Also included extra tests for this new and the existing casting behaviour.