In the Middle Ages, Virgil's reputation was such that it inspired legends associating him with magic and prophecy. During which time period did Virgil's reputation inspire legends associating him with magic and prophecy