The legal status of foreigners in Europe between medieval and modern ages