Fix more edge cases in #contains().

This should fix issue #346 for good.
Merge git://github.com/paperjs/paper.js