How a cell decides its own fate: a single-cell view of molecular mechanisms and dynamics of cell-type specification