What role did the construction of monasteries play in the rise and spread of Christianity during medieval times?