Relative invariants, ideal classes and quasi-canonical modules of modular rings of invariants