Make full use of the flux::LookAheadStream to implement archive format detection.

Signed-off-by: Frank Mertens <frank@cyblogic.de>
Trimmed down the memory overhead of ByteArray.

Signed-off-by: Frank Mertens <frank@cyblogic.de>