stat: improve use of consts for test thresholds
Created by: kortschak
There is a wide variety of approaches to specifying test thresholds in stat, ranging from consts, to vars and numeric literals at the call site. It would be good to have these all as consts in a func preamble.