Fix server-side cookie unpacking.

When unpacking the cookie, also split the keys. The contextual code expects this.
Fix test code.

In order to make testing simple we added some test code to the project. This
code had problems with listen sockets not being sent to parents correctly, and
also the listen/2 call was invoked as listen/1.