make dbname and collname uniform across routes.

This commit makes restful parameters accept database name as
'database_name' and collection name as 'collection_name' in all rails
controllers. Removed the code that was duplicated in multiple places.