Fix for #3789, segfault in _tri

Candidate fix for issue #3789.  Segfaults were occurring when travis was running `test_tritools`, but only under python 3.  This is an esoteric one - my local tests all ran fine under python 3 with both old and new gcc and numpy, so I could only debug by pushing candidate fixes to my github mpl repository and running travis on them there.  That's a new form of remote debugging for me.

The problem occurs accessing const/non-const boolean arrays wrapped in the new numpy::array_view classes.  It shouldn't occur, but evidently some combination of hardware, gcc and python versions behave differently.

I will need to go through the travis logs with a fine toothcomb before this is merged.

@jenshnielsen: Thanks for reporting this.