Fixed #9893 -- Filename could exceed max_length on a collision

Passing max_length argument into the Storage's save() and get_available_name() methods.
Rewriting get_available_name() so filenames do not exceed max_length when there is a collision.
Adding test for the case.
You can have a look at 9bf652dfd6a738fd841471f6abd71cba1b206d9f as an example of how we introduced object level permission to authentication backends.