Added test for missing API params

Test has been written to check for lp:1152393, but that has been an already fixed duplicate. We still add this little test to explicitely show that the API handles missing params well without closing the websocket.
So this structure certainly makes me wonder if how the handler is defined is correct.
Looking at the code state/apiserver/apiserver.go I think the trick is that you have to call Serve() before you call Start(). That way there isn't anything responding on the websocket before you have a service that you are serving.
So probably you can remove the channel checks and just restructure your setup func as:
conn.Serve(&DispatchRoot(), nil)
conn.Start()

Certainly if you were actually using a real HTTP website, you would never have that channel to be able to indicate "ok, you've connected to my website, but give me 20ms to actually have the connection ready for you".