Robust poll controllers.

Now poll function is fully operational.
Controllers are robust, it converts `params[:type]` to integer and fetch only the relevant parts of poll table in database.

Some improvements to `search_company` and `search_category` in environments.rb are also included (accidentally ... )