Makefile.am: Put agent in its own directory and cleanup

Since we're going to be putting more into the agent, move
it to its own source directory.

Moved some common code into src/cockpit to be used
by both cockpit-agent and cockpit-ws.

While doing this, I did a bit of housekeeping in the
make files. This helps with code coverage by not building
lots of stuff multiple times.

Sorry that there's a bit mixed together here, but due to
time constraints I haven't split it all out into
separate patches