(Ftranspose_regions): Fix text-properties for len1==len2
When `len1_byte == len2_byte`, the code presumed that len1==len2
as well in its handling of text-properties. Fix that case.
While at it, try and reduce code duplication by hoisting common
code out of `if`s, and throw away the optimization for `len_mid == 0`
which only saved 3 trivial function calls.
* src/editfns.c (Ftranspose_regions): Shuffle the code a bit.
* test/src/editfns-tests.el (editfns-tests--transpose-equal-but-not):
New test.
(cherry picked from commit
d84dbcb4504f6c53968a9f245b31676c90921b38)