Move subdomain-related code to a separate file.
Add test code for the subdomain library.
Temp changes.
Fix NodeLocation and NodeExtent.
Change the domain merging heuristic.
Add more test cases.