Bump version to 0.4.0

- Update to latest gems that do not use monkeypatch
- Use refinement instead of monkeypatch (using AgileUtils::HashExt)
- Use precise versions for gemspec file