Match performance improvements

Tested for apache log for 100k iterations saves almost a sec
```
@pattern_line = '%{COMBINEDAPACHELOG}'
@log_line = '31.184.238.164 - - [24/Jul/2014:05:35:37 +0530] "GET /logs/access.log HTTP/1.0" 200 69849 "http://8rursodiol.enjin.com" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.12785 YaBrowser/13.12.1599.12785 Safari/537.36" "www.dlwindianrailways.com"'
 
 
suyog@machine:~/ws/ruby-grok (match_improvements)$ ruby /Users/suyog/ws/ruby-grok/test/pure-ruby/benchmark_pattern.rb
Rehearsal -----------------------------------------------------------
100k Named Captures On    3.250000   0.080000   3.330000 (  1.940000)
100k Named Captures Off   2.710000   0.020000   2.730000 (  2.309000)
-------------------------------------------------- total: 6.060000sec
 
                              user     system      total        real
100k Named Captures On    1.260000   0.000000   1.260000 (  1.194000)
100k Named Captures Off   2.230000   0.020000   2.250000 (  2.205000)
`