NB CA-7 Overflow of enumeration used as enumerator value

As directed by CWG Motion 1 from 2014-Isaquah.

Also fixes CWG1765.
NB CA-8 Scoped enumeration in a switch statement

As directed by CWG Motion 1 from 2014-Isaquah.

Also fixes CWG1767.
NB CA-15 Type matching of non-type template parameters and arguments

As directed by CWG Motion 1 from 2014-Isaquah.

Also fixes CWG1770.