Use Rails 3.* as development dependency

Tests are unable to run because of features deprecated in Rails 4.0 that still exists
in dummy application.
Unit tests for TestClient::RackTest.to_env_headers

Behaviour for empty hash was buggy - it was returning nil, but caller
was expecting empty hash. Two other unit tests are introduced just to make
better test coverage of this part of code.