Start converting backend to C++

Use a vector for backends, avoid malloc.
Make backend_device members into objects where needed.
Make readcb and writecb methods.
Switch to cmake.
Convert functions to methods where appropriate.
Objectify status interface.
Start converting api_serverside to C++.
Use RAII for serverside members.

Add a C++ interface for backend.
Convert functions into methods where appropriate.
Use object wrapper for bufferevent.
Avoid double close.
Make binaries much smaller with -Os -flto
Prefer std::string over C strings.
Wrap libevent callbacks in try / catch.

Not sure how proper C++ this is, but seemed the most prgamatic way.
Start converting status to C++.
Make status_ptr wrappers for dispatch functions.
Store a backend_device reference in status.
Add -fvisibility=hidden for a slightly smaller binary.
Start converting marantz and lge code to C++.
Need to set fd to -1 for timeout event.