Fix detection of engine in rake db:load_config

d1d7c86d0c8dcb7e75a87644b330c4e9e7d6c1c1 moved engine detection from the `db:load_config` task to `Railtie`, breaking it in the process because `ENGINE_PATH` is not defined at that point.

As a result, running `rake db:migrate` from an engine would only run migrations from the dummy app.

This fixes the issue by trying to find the engine in the same way used to define `ENGINE_PATH`.