Allow exiting from tpDoEventLoop().

Sometimes you need a way to for an exit from the main event loop.
Add a newline to the end of the notify json message.

Have seen multiple notify json messages reach the client in a single
call to read(). This makes seeing the multiple messages easier in a raw
dump of the read buffer.
Add subscribe/unsubscribe functions to client lib API.
Add event loop to bfdmontest application.

Now generates subscription requests and can receive raw notification
responses (responses are just dumped to stderr, json is not yet parsed).