Rails 4.0 upgrade

1. Rename method find_by_imei to find_by_imei_view because the name create a conflict with the names from Dynamic Finders.

2. Fix more test cases.