This revision is to let ac_match() function returns the
pattern that matches the subject string.

Lua binding interface remain changed (it is calling
ac_match2() instead of ac_match()).

This change degrade the performance by 1-4%. As far as I can
guess, it's due to higher call overhead.