Add BuxtonArray

BuxtonArray is a dynamically allocated self-managing array, which is
also reusable. We can use the BuxtonArray (made easier via its len
member) to easily deal with lists of BuxtonData's, for instance.

This will primarily be used to easily facilitate the listing of keys
within a given layer in Buxton.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
Begin client-side implementation of buxton_*_list_keys

All this does so far is enable the client to use the function whilst
in direct mode. The client will be able to obtain a list of all keys
within the given layer.

The "glue" to make this work needs implementing within the backend
modules and then the protocol. These will follow in separate commits.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
db/gdbm: Implement list_keys

This enables clients to list all keys within a given layer, returning
a new BuxtonArray of all keys. This may return an empty BuxtonArray
if no keys are found within the layer.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
serialize: Support serialization of BuxtonArray

With this commit we can now pass a BuxtonArray to buxton_serialize_message
as the only parameter, using BUXTON_CONTROL_LIST, to serialize all of
the BuxtonData's within that array.

Deserialization is unaffected, as the returned data is correctly
serialized with the parameter count coming from the length of the
original array.

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
Implement wire-protocol side of list_keys

We merely return a BuxtonArray for the client to transparently deal
with, populated with the key names found in a given layer.

Given that the list method still needs to send a status, and a
complete BuxtonArray as a parameter, the serialize function now
handles this as a special case, ensuring that the message type
is sent first (BUXTON_STATUS)

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
test: Add test case for BuxtonArray

Signed-off-by: Michael Ikey Doherty <michael.i.doherty@intel.com>
test: Add tests for new LIST serialization

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