[DO NOT MERGE YET] Fixes #8805 - Taxonomies duplication refactor

An initial proposal on how to factor out common code from location/organization model and tests. A few tests have to be moved away from location.rb for this to be merged.
That can be done too, would you prefer that? I opted for this because this way the module can be aware of the class name of the object where it's mixed in, and also because for the moment we've kept this functionality in location/organization and not in taxonomy.