Large changes to references and locking (RAII style).
Added make_shared from C++14.
Improved PlayerThread.

Still not a working commit; errors on handling the thread state.