Implemented Mobius Function in residue_ntheory module

rebase of stalled pr #2825.