What were the primary factors that led to the decline and eventual collapse of the feudal system in medieval Europe?