Add a key on relative_path_cache in the items table to improve performance on installs
that use File_Proxy heavily.  Fixes #1920.
Merge branch 'master' into 3.0.x
Automated update of .build_number to 301 for branch master
Last update: 0c214d85e63fc74fb315ca1b542251d5c6112201 (1 commits ago)
#1969 - Give graphics events the ability to override the standard process.
While graphics_rotate, graphics_resize, and graphics_composite events already exist, they don't have the ability to *override* the standard process.
This makes it a bit tricky when you want to replace the standard procedure with another (e.g. use jpegtran to perform lossless jpg rotation).
Solution:
- make a temp filename.
- tell the events to use it as the output file.
- if an event makes something, use it and skip the standard process.
#1971 - Make resequence_child_weights_test unit test more reliable.
- Set the sort_column of the parent album to id, which has no possibility of being identical between the two photos.
- Now, the reweighting will reverse the order even if they were created during the same second.
Merge pull request #109 from shadlaws/fix_1971

#1971 - Make resequence_child_weights_test unit test more reliable.
Automated update of .build_number to 302 for branch master
Last update: daad29e5c391d15d99cd8f3f5af8aaf3e3b76749 (1 commits ago)
#1945 - Extend legal_file helper functions.
- Added get_types_by_extension function, which is a merged version of get...types_by_extension functions (similar to get_extensions).
- Added optional extension argument to get...extensions functions similar to get...types_by_extension functions.
- Added unit tests.  Now, every legal_file function has one.
- Restructured helper file to include caches.
- Added array_unique to get...types (derived from get...types_by_extension, which can be many-to-one).
- Edited server_add, uploader, and item model to use new functionality.
Merge pull request #107 from shadlaws/fix_1969

#1969 - Give graphics events the ability to override the standard process
Automated update of .build_number to 303 for branch master
Last update: 23c6c507526ec1fc4a7ff80afb154341d75e9cab (1 commits ago)
Merge pull request #106 from shadlaws/fix_1945

#1945 - Extend legal_file helper functions.
Automated update of .build_number to 304 for branch master
Last update: cf58e064d462eae6a1973cdf146e4867bf539357 (1 commits ago)
#1967 - Improve how graphics::generate handles missing/bad images.
- Made missing_photo match the image format (jpg, png, etc.).
- Swapped missing_photo.png for missing_photo.jpg since it's likely to require less conversion to match.
- Improved error messages to user when things go wrong.
- Ensured that missing image placeholders are always copied when there's an error.
- Ensured we don't mistake no file output for a correct file output (delete target before attempt).
- Restructured graphics::generate a bit to work better with above changes.
- Added unit tests for graphics::generate.
#1970 - Make add watermarks more secure and add unit tests.
This follows #1855 and #1951...
- Ensured that invalid or illegal files are not added even if they have valid extensions.
- Added unit tests (currently there aren't any...)
Merge pull request #105 from shadlaws/fix_1967

#1967 - Improve how graphics::generate handles missing/bad images.
Automated update of .build_number to 305 for branch master
Last update: b7c73ee693473eef9b536fb05f8c2b190e47b866 (1 commits ago)
Merge pull request #108 from shadlaws/fix_1970

#1970 - Make add watermarks more secure and add unit tests.
Automated update of .build_number to 306 for branch master
Last update: 899590873bbc444a35654573473f3c7326a95f87 (1 commits ago)
 #1973 Handle redirected G2 URLs for tags, including g2_itemId passed
Merge pull request #110 from mikeage/g2_import

 #1973 Handle redirected G2 URLs for tags, including g2_itemId passed