Update mongoid.rb

Modified detection of mongoid3 to use Gem.loaded_spec instead of relying on whether :Observer is defined.  The mongoid_observer gem adds this symbol and this gem is likely in use while all gems coalesce into RoR4 compatibility.