Make as_io more strict for generic formatting

Previously we attempted to io_lib:format any 2-tuple. This patch adds
a guard that both elements must be lists.

Also using ~p to format floats gives better fideltiy in some cases
without much loss for logging purposes.

And finally: tests!