Institutions and the Path to the Modern Economy: Lessons from Medieval Trade