Improve apiServer.js to support multiple mock and Parsoid servers

Instead of just managing a single server, keep a map of them so
that multiple servers can be started from a single process. This
is necessary, for example, to test the Parsoid API using a mock MW
server.

Change-Id: I19f8dd106dc32095c07ce38e8c02eaf1f60d8ee4
Merge "Improve apiServer.js to support multiple mock and Parsoid servers"