Convert statics to constants

This pr fixes the compile failure with latest `rustc`.

As a bonus, this pr contains fixes for some warnings.
This (and other values) didn't get changed to `const` in the [rust-lang repo](https://github.com/rust-lang/rust/blob/f9fc49c06e5c71a8d63d6120e1a92b6445fb501d/src/libnum/bigint.rs#L1847). I think these should remain as `static` to not diverge from upstream.

(I'm not yet acquainted with the const vs static semantics, but I think that in this case `static` should be used because `SUM_TRIPLES` is an address to read-only memory. But I'm not sure)