Migrations should be run before assets

In Rails 4, the assets:precompile task needs a DB connection and the DB
has to be migrated and tables created before the asset precompilation is
started, otherwise it will fail. Since the capistrano-rails gem enqueues
both tasks after the same hook, the require order of the tasks matters.
If we require capistrano/rails/migrations before capistrano/rails/assets,
the migrations task will be run before the assets one.
Don’t fail if no themes exist

Also, the code is a bit more DRY this way.

I am unable to deploy the project, because asset precompilation fails
on production due to the DB being empty.