MAINT trim away >10 kLOC of generated C code

Trimmed away some dead code and used lower-level APIs were it didn't hurt readability. This is intended to get smaller code, not extra speed, and the generated C code is <del>hundreds of</del> more than 10.000 lines shorter.
Hmm, indeed, I thought that `dtype == bool_` would store data as `bool_`, but in Scipy 0.14.0 at least what is stored is Python integers. Then, this doesn't matter so much.