Multi-instance support

Only works in the GUI for now, doesn't break  the command-line client but the new options are not implemented.

Related to #29 
- [ ] Add TODO: Many of these functions could be moved to `ckan.dll` (and have test cases written for them!).