Stable Models of Formulas with Intensional Functions