A lot of improvements on formatting and syntax best practices

I used Rubocop to search for formatting and syntax warnings. There are still a lot of warnings left, like "Use the new Ruby 1.9 hash syntax", which I ignored because raven-ruby still supports Ruby 1.8.7, and "Cyclomatic complexity for to_hash is too high", which would require a bigger refactoring.