Fixed #2274

This PR is a quick fix for #2274. I use the `custom_model` function to create an `astropy.modeling.Model` instance internally, when the model is a an ordinary function. Furthermore I added a check, that the `model` argument is callable.
@cdeil, @eteq 
When the `custom_model` function is used to create a model from a function, the model instance is of type `_ModelMeta`, and could also be passed to `discretize_model`. That's why I included this check. But as the function could be directly passed to `discretize_model` it is not really necessary...I agree.