Optimize checks

We were creating a lot of temporary token objects in loops.

Replace vectors created on each function call with static std::array
instances.

MASSIVE improvement in speed:
On Folly+Gtest+double_conversion, time is now down to 1.7 s (vs 3.7 for
Flint C++)

On my own code base, time is now 0.156s, used to be 0.98s in the initial
tests