First-Order Stable Model Semantics with Intensional Functions