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 
I'm still not sure about this, but have documented in 48cc12d1819a10875d5570ae6c6035383e82bf8a.