Modular invariant theory of finite groups and Galois ring extensions