Adding features needed for more interesting middleware

Cookie parsing and setting
Query parsing
Various draft "security.*" keys
Incremental work towards security.* support