Loewy and Artinian modules over commutative rings