Compute cost for linear regression with multiple variables
Performs gradient descent to learn theta