Fix #1081

If an identifier starts with a number, this prepends `N` so that the C and javascript compilers can parse it. Includes test.

`mangle` is simplified with newer language features, as well as moved into `ccgutils.nim` to reduce code duplication between `ccgtypes.nim` and `jsgen.nim`, which has the side effect of changing current JS gen slightly such that it prepends `HEX` to weird characters instead of `X`