libcore: Move the numeric operations out of Num. r=brson

Sadly I could not use trait inheritance due to a type parameter substitution
bug.