Teh/linesearch

I cherry-picked improvements on the `teh/constrained` branch (those that didn't involve the speculative interior point method), because I didn't want a merge headache. Then I got rid of Options. Should fix #71, #75. May also address #79, but I haven't looked yet.
This might have been moved as preparation for the interior point method, but honestly I can't remember. There doesn't seem to be any reason _not_ to do this here, and it shouldn't cause any change in behavior.