implement peek for all files and stdin
enable automatic detection of language using peek, modernize the detector interface.