simplify code, keep it in sync with the blog post

This introduces a new `addmod` function, that was previously written
inline using the ternary operator. Also, it replaces masking with a
conditional. To my surprise, this performs 24% better for u32, and
20% better for u64 on msvc110, without profile-guided optimisation.
I have yet to try Clang and GCC, but I believe they were faster to
begin with, so I expect no regressions there.
replace last ternary operator with submod for simplicity
replace conditional in `mulmod` with mask again

Though my previous change improved performance on msvc110, it
degraded performance for Clang 3.4 and GCC 4.9. The difference
between GCC and Clang was also quite big (and msvc110 is far behind).
With this change, GCC and Clang perform similarly, the best
performance yet.

This is not strange: without the conditional, the call to `addmod`
can be inlined and a branch is avoided, so masking is better. As for
`powmod`, it calls `mulmod`, and `mulmod` is expensive enough that
avoiding it makes sense.