Added a function expr_is_linear_in_vars to LinearSolve. This is useful for detecting expressions that we could have a reasonable chance of solving.
Changed expr_is_linear_in_vars functions to return an int, which can be decoded by methods in the Halide::Internal::Linearty namespace. Basically, 0 = constant, 1 = linear, and >1 = non-linear. This is actually require to determine whether or not a combined expr is linear.
Split out an expr_linearity function from expr_is_linear_in_vars to compute the linearity code for expressions, so expr_is_linearity can continue to return a simple boolean.
Added a comment to the Linearity namespace describing the linearity code.
Merge pull request #551 from halide/linear_solver

Added linearity tests to linear solver