MIPS64: Refactor and make div/mod operations compliant to R6 rev.

TEST=