Fast algorithms for computing with integer matrices: normal forms and applications