Fix Location header

Fix #414
Improve Websocket example
Merge branch 'fix_created_path' of git://github.com/nevar/cowboy
Fix examples links

Thanks to grass on IRC for the heads up.
Make sure rest_terminate is always called

Also improves error reporting.
Add an example with custom middleware