Added ruby-head to travis allowed-failures

This is probably a contraversial idea. ruby-head can be fairly unstable
but then json is a core gem. At least if it's an allowed-failure then
builds will always be run against ruby-head, but pull requests (and
master) won't report build failures if something is broken in ruby-head
Merge pull request #221 from iainbeeston/allow_ruby_head_to_fail

Allow ruby-head builds to fail
Added tests for standards_mode to ensure it parses json values
Added rfc7319 standards_mode to the pure ruby generator and parser
Looks like this was not committed last time parser.c was generated?
Added rfc7159 standards mode to the c-extension parser and generator
Added a new EncodingError for when a string is too short to be parsed

This is quite important when adding rfc7159 standards mode, as under
rfc7159 the minimum length of a json text is 1 octet (not two - as with
the regular mode). Before this commit, a ParserError was raised if the
string was too short, but there was no way to distinguish (in tests)
whether the parser was failing due to syntactic issues in the JSON (as
it would in quirks mode) or because the JSON is too short. (Other than
looking at the error message - bad idea)

As a part of this I also made the pure parser check for string length,
as it was the only parser that not doing so (which seems inconsistent).
Looks like this parser change should have been comitted previously
Added rfc7159 standards mode to the java parser and generator