add empty case for 'Sleep' to silence warnings

Clang reports that there is an unhandled case when switchin on an
enum. Explicitly doing nothing silences the warning, and makes it
harder to forget updating the case when something changes in the
future.
change warning level to 'all' and resolve warnings

There was one unused variable, and three reordered initialisations.
change warning level to 'extra' and resolve warnings

Counters have been changed from `int` to `size_t`. Unused parameters
have been removed. Note that the algorithm that decides the number of
plot units to use has been changed as well (from `n / 2 - 1` to `n / 2`).
resolve memory leak

It was hidden in plain sight; the allocation and deletion were only
a few lines apart. Yet it took `scan-build` to point it out to me.