player: move stuff out from base.h

These are only really used in device.c, so let's just move these
helpers there.
player: only include socket-stuff for client-builds

While we're at it, move this to device.h instead of base.h to
reduce global complexity a bit.
editor: make space enter value

Previously we were discarding it. But let's be consistent with the
logic of the other keys instead.
editor: superficial code-style clean-ups

This should be entirely non-functional changes.
editor: implement own structures

There's plenty of good reasons to keep the data-structures
separate between the editor and the player. For instance, it
allows us to move them in different directions, making the
editor-concepts more high-level and the player-concepts more
low-level.

Some ideas:
- Switch to cubic polynomials on the wire and in the player.
  This allows us to add more curve-types in the editor, without
  having to bother alternative implementations of the player
  with the details.
- Store multiple values "per row" in the editor to support
  incoming/outgoing values. This is useful for sudden changes
  at low row-per-beat settings.
- Use signals/slots per track in the editor to communicate
  changes to client.

Most of these ideas could probably be done without this change,
but they certainly become easier with.
editor: use signals for internal communications

Instead of all these objects having to know about each other, use
Qt's signal/slot mechanism to notify each other. This allows us
to unmangle some dependencies, yay!
player: remove sync_data structure

the separation between sync_data and sync_device was only needed
due to the reuse of the sync-data code in the editor. This isn't
the case any more, so let's get rid of it.
editor: stop snooping in the players headers

We can't really change these due to alternative clients/editors
anyway. So there's no added maintainance in duplicating these
definitions - let's just do it to avoid having to care about
source-level interopability.

While we're at it, move the player-definitions to the only place
using them.
editor: prevent editing when playing
editor: mark main-window as modified if document is modified
editor: factor out polynomial helper
editor: factor out the painting of a single track
editor: use QLineEdit instead of hand-rolling one

We're editing a line of text, so it makes sense to use a QLineEdit
instead of hacking in editing into the control ourselves. This
gives the users a few neat extra-features, like copy-paste and
undo/redo on the editing itself, yay!

Work around QTBUG-4045, by stripping away group-separators.
editor: factor out left-margin painting
editor: factor out interpolation-pen selection
editor: simplify painting
editor: use QRect for selection
editor: move document-implementation into source file
editor: store everything needed in undo-commands
editor: use Qt's undo framework

Instead of hand-rolling our own systen, let's use Qt's built-in
one to reduce the amount of code.