fix subscription server  bug introduced when porting to async, add support for event in server, reorganization

lots of changes. I should have tested more but there are so many changes it is better to merge otherwise it will be hard to merge
If you really want I can move them back, but isn't best practice to have
headers?
Later we should anyway move requestqueue to a session object. They are part
of session
On Sep 12, 2014 5:40 PM, "Olivier Roulet-Dubonnet" <olivier.roulet@gmail.com>
wrote:

> I completely agree. But I thought it would help to take headers out.
>