Regulation of stem cell function during tissue homeostasis and transformation