Split code into brickd and daemonlib

The daemonlib code will be reused in the RED Brick API Daemon.