Smith Normal Form over Local Rings and Related Problems