Improve performance encode and decode
Improve performance encode and decode

```
hashids = Hashids.new("this is my salt")
hashids2 = Hashids2.new("this is my salt")

Benchmark.ips do |x|
  x.report("before encode") do
    hashids.encode(12345)
  end
  x.report("after encode") do
    hashids2.encode(12345)
  end
  x.compare!
end
Benchmark.ips do |x|
  x.report("before decode") do
    hashids.decode("NkK9")
  end
  x.report("after decode") do
    hashids2.decode("NkK9")
  end
  x.compare!
end
```

```
Warming up --------------------------------------
       before encode     1.026k i/100ms
        after encode     4.609k i/100ms
Calculating -------------------------------------
       before encode     10.885k (± 3.3%) i/s -     54.378k in 5.001138s
        after encode     46.228k (± 3.7%) i/s -    235.059k in 5.092274s

Comparison:
        after encode:    46228.2 i/s
       before encode:    10885.2 i/s - 4.25x  slower

Warming up --------------------------------------
       before decode   504.000  i/100ms
        after decode     2.285k i/100ms
Calculating -------------------------------------
       before decode      5.278k (± 5.3%) i/s -     26.712k in 5.077642s
        after decode     22.669k (± 7.2%) i/s -    114.250k in 5.075605s

Comparison:
        after decode:    22668.5 i/s
       before decode:     5278.2 i/s - 4.29x  slower
```

peterhellberg/hashids.rb