SANT JOAN DE LES ABADESSES, Monestir de Sant Joan, S-XII