ca-shell.c: Use fully buffered stdout when stdin is not a tty

This reduces system call overhead when dumping large amounts of data.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
select.c: Get rid of old expression eval and printing code

This has now been replaced by LLVM generated code.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Use own code for formatting ISO 8601 timestamps

strftime is very slow, and sprintf is actually even slower, so we use our own
unsigned integer formatting function instead.  This cut down the running time
of a test program from 4 to 3 seconds, even though the test was not limited to
date formatting.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>