Fix broken websocket test

- extract common functionality into a mini reflection library
- made reflection code a lot more robust
- wrote basic test for apply to test slices
Merge pull request #53 from beatgammit/v2

Fix broken websocket test