Add method to register for notifications

Currently this is only implemented client-side, but essentially we
serialize a BUXTON_CONTROL_NOTIFY message for the given key, and
send this off to bt-daemon. bt-daemon (soon) will then use this
to identify clients when key-values are changed, to send a message
indicating that this has happened.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
core: Add skeleton for new notification framework

Simply put we'll store a list of registered clients for each key
in Buxton that has registered interest (via register_notification)
Any time a key is updated, we'll send a message to all clients
except for the calling client.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
protocol: Avoid NULL dereference

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
daemon: Store a list of notification-registered clients

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
daemon: Send notification upon key change

As we rely on active connections and credentials may change, we only
inform the interested client that the key changed, and which key
it is.

We do not inform the client of the layer on which the key changed,
nor do we send them the value. An interested client should then
ask Buxton for the value of the new key using their active client
connection.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
Add skeleton for demo programs

We'll use demo programs to test and help implement new and existing
features within buxton, they are not intended for general use.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
demos: Add timing demo

This demonstration simply sets the same key and value 10,000 times
and reports the total and average times for this operation. Note
that debug should be disabled before performing this test, because
constantly printing to the terminal will drastically reduce performance
and is an unfair indication of Buxton performance.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
protocol: Use size_t in serialisation calls

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
daemon: Notify all clients of change, even the originator

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>