Cors API proposition

There seems to be no activity regarding #26 for a while. This pull request is proposition for an API based on your cors branch with some tests and fixes (unfortunately browser testing is left out of scope of this request even though i tested it with FF 24 and Chrome  30.0.1599.114). 
This implementation provides a way to simply define your Origins and start serving cross-origin requests quickly.

Things i am not sure about though are:
trie changes - they look ugly
acces control handling -  may be better implemented