Merge pull request #2665 from akshaymohite/optimization-fixes

updated checks of environment with Rails.env by Rails.env methods
FEATURE: vBulletin importer
FIX: vanilla importer when private topic had no first post (WAT)
Fixed ActiveRecord validation for post_id in incoming_link.rb