api: change Applog so it returns 400 when number of lines is missing

The number of lines is optional in the client, and defaults to 10, but
in the server it should not be optional. Now it's mandatory :-)
api, app: move database communication from Applog handler to app package
api: unexport AppLog handler
testing: added FakeEventSource

I will use text/event-stream (aka EventSource) to implement --follow
support in the handler. The handler will receive a implementation of the
EventSource interface. I'm adding the fake implementation in advance.

Related to #194.