Changed optimisation level to be in AM_CXXFLAGS instead of CXXFLAGS so
that it can be overwritten at the per-target level.
Added separate compilation rules for the Ragel generated source code so
that warnings can be suppressed and optimisation levels can be changed.
Removed some unnecessary data range checks to keep gcc happy, as well as
adding some unnecessary variable initialisations to keep gcc happy.