Compatibility with Mongoid4 most recent updates.

The `Mongoid::Document#metadata` method has been renamed. 

Also testing with all versions of Mongoid and more Ruby versions.