BUG/ENH: fix and improve constant detection
REF: _handle_constant, check implicit in all cases without non-zero constant
REF: remove try ...except (no other changes)
Fix const_idx with multiple const, more tests
REF: has_constant remove special code in linear_model, is moved to data
Merge pull request #1797 from josef-pkt/ref_hasconstant

BUG/ENH: fix and improve constant detection