Fix for TIKA-1336: initial working detect stream interface, along with u...

...nit tests.