Request object refactoring.

- Fix some bugs uncovered from unit testing.
- Use array_select() in some cases to simplify the code.
- Implement setting in Request->data().
- Add Request->hasInput().
Add and tweak some unit tests.
Fix a typo in the read-me.