Fixed assertion for postgresql and sqlite (#8842).

--HG--
extra : convert_revision : svn%3Ae93f8b46-1217-0410-a6f0-8f06a7374b81/trunk%4012480
Reduces the number of subqueries when searching with many custom fields set as searchable (#15781).

--HG--
extra : convert_revision : svn%3Ae93f8b46-1217-0410-a6f0-8f06a7374b81/trunk%4012481
Use Rails.application.config.i18n.load_path for adding plugin locales (#12753).

Patch by Takeshi Yaegashi.

--HG--
extra : convert_revision : svn%3Ae93f8b46-1217-0410-a6f0-8f06a7374b81/trunk%4012482
Use the mime-types gem for getting mime types from filenames (#15790).

--HG--
extra : convert_revision : svn%3Ae93f8b46-1217-0410-a6f0-8f06a7374b81/trunk%4012483
Store mime type lookups in a hash.

--HG--
extra : convert_revision : svn%3Ae93f8b46-1217-0410-a6f0-8f06a7374b81/trunk%4012484