implement polling for signalling channel

Implementing poll. Messages have now type, and
get the UNIX time recorded server-side.

Polling can get all messages since a UNIX timestamp
that is presented as GET parameter.

In JS, now can subscribe callbacks on messages
types that will be called with the message contents.

Signed-off-by: ddalex <ddalex@gmail.com>