Update data_generator script

This PR updates `data_generator.rb` so that it runs on a modern `ruby` (>= v1.9, as far as I can tell).

On my machine I was able to reproduce the exact contents of `utf8proc_data.c` modulo the copyright header by running:

```sh
ruby data_generator.rb < unicode500.txt > utf8proc_data.c.new
```