Alternative to #902 (but contains part of it).
Permit a configure-time option to use a trick to let the compiler prove our VERIFY_CHECK
statements are side-effect free. See details on https://stackoverflow.com/a/35294344, and was suggested on #902 (comment).
This is default off in order to not break builds on untested platforms (which may have different sensitivity for this kind of optimization). It can be set to auto as well, to let the configure script figure out if the compiler (and current compilation flag) permit usage of this.