This essentially extends similar_face_select_exec to be able to work with UV faces, both as selection target and information source.
For area and perimeter there is a data_mode property to select between UV space and Mesh space.
The selection_mode is a hidden property that is set by UV_OT_select_similar and MESH_OT_select_similar accordingly to define whether the selection should happen in the mesh or the uvs.
This was initially based on D2738, which needed to be adapted to multi object edit mode and to use gset and kdtree. This made it soon to look like a copy of similar_face_select_exec, which is the reason why I decided to merge the two.