Support changing location parent in importer

and a bit of cleanup and some tests

can read commit by commit

http://manage.dimagi.com/default.asp?113443