fixes #3059 - new mail rake task sends foreman reports to each user
fixes #2400 migration to remove orphaned records and add foreign keys constraints to database tables