add relations filter to search in modal #443

Refactoring of ModulesController::getAvailableRelations().
Moved the business logic in ObjectRelation model