Implement Auth feature generator

* generalize Factory a bit to accept full key
Move State to stream, Handlers receive Stream
Fix ReadOpen to really read <stream> element
Fix stream factory usage and add log
Implement some auth
Merge pull request #4 from dotdoom/master-features

Implement Auth feature generator