A unified model of density limit in fusion plasmas