Bring ModelFrame, ModelMatrix and model_response more in line with the R functions

This work is still incomplete.