Fix Rake tasks when using Apartment in an engine

I had the same problem described in #155. 

This approach makes things a bit more convoluted, but solves the problem of resolving the name of the rake tasks to enhance, as well as checking `Apartment.db_migrate_tenants` at runtime. I found this was necessary as the initializer file was being loaded after the enhancements.