Improvements for RANSAC

Backwards-compatible, same behavior as before.
A neat trick, by the way:

```
if 0 < b < 1:
   ...
```