How was Western European society influenced by the Roman Catholic Church during the Middle Ages?