Person objects in tests should set legal_name; name doesn't work
In tests, include the unusual possibility of a person with an empty name

Presumably when this happens it's an error, but the code doesn't
prevent such people from being created at the moment, so update
the tests to include such a case to check behaviour when it's
present.

Also fix the position sorting code to deal with this case.