First principles analysis of the CDW instability of single-layer 1T-TiSe2 and its evolution with charge carrier density