Fix some pretty bad bugs.

Exposed by compiling for mips linux.
Support throttling individual commands.
Disable som spammy debug logging.
Conditionally check some headers for better linux support.

Also, gcc 4.6 doesn't support some C++11 features.
Daemon style programs should ignore SIGPIPE.