MAINT: Refactor lhs and rhs constraint formating into functions
MAINT: Refactor lhs and rhs constraint formating into functions

Currently _clean_input checks constraints seperately for each of the
LHS equality (`A_eq`), RHS equality (`b_eq`), LHS upper-bound (`A_ub`)
and RHS upper-bound (`b_ub`) constraints seperately. The conversion
 of LHS and RHS constraints to arrays is nearly identical.

This commits refactors duplicate code between the conversion into
seperate functions.

mdhaber/scipy,anntzer/scipy,WarrenWeckesser/scipy,endolith/scipy,ilayn/scipy,mdhaber/scipy,scipy/scipy,grlee77/scipy,aeklant/scipy,matthew-brett/scipy,rgommers/scipy,tylerjereddy/scipy,nmayorov/scipy,jamestwebber/scipy,nmayorov/scipy,mdhaber/scipy,zerothi/scipy,gertingold/scipy,grlee77/scipy,jamestwebber/scipy,aeklant/scipy,zerothi/scipy,aarchiba/scipy,jor-/scipy,tylerjereddy/scipy,e-q/scipy,jor-/scipy,pizzathief/scipy,pizzathief/scipy,andyfaff/scipy,arokem/scipy,zerothi/scipy,aarchiba/scipy,nmayorov/scipy,e-q/scipy,pizzathief/scipy,tylerjereddy/scipy,ilayn/scipy,person142/scipy,gertingold/scipy,Stefan-Endres/scipy,aeklant/scipy,Stefan-Endres/scipy,andyfaff/scipy,jor-/scipy,ilayn/scipy,andyfaff/scipy,Eric89GXL/scipy,arokem/scipy,perimosocordiae/scipy,perimosocordiae/scipy,pizzathief/scipy,endolith/scipy,e-q/scipy,lhilt/scipy,jamestwebber/scipy,person142/scipy,lhilt/scipy,arokem/scipy,aeklant/scipy,person142/scipy,gertingold/scipy,andyfaff/scipy,zerothi/scipy,scipy/scipy,person142/scipy,Eric89GXL/scipy,ilayn/scipy,e-q/scipy,nmayorov/scipy,mdhaber/scipy,aarchiba/scipy,anntzer/scipy,zerothi/scipy,mdhaber/scipy,Stefan-Endres/scipy,anntzer/scipy,jamestwebber/scipy,endolith/scipy,Eric89GXL/scipy,WarrenWeckesser/scipy,grlee77/scipy,person142/scipy,perimosocordiae/scipy,anntzer/scipy,tylerjereddy/scipy,matthew-brett/scipy,Stefan-Endres/scipy,arokem/scipy,scipy/scipy,aarchiba/scipy,matthew-brett/scipy,Eric89GXL/scipy,Eric89GXL/scipy,perimosocordiae/scipy,grlee77/scipy,WarrenWeckesser/scipy,WarrenWeckesser/scipy,lhilt/scipy,Stefan-Endres/scipy,rgommers/scipy,aeklant/scipy,endolith/scipy,rgommers/scipy,lhilt/scipy,scipy/scipy,jor-/scipy,WarrenWeckesser/scipy,endolith/scipy,perimosocordiae/scipy,vigna/scipy,ilayn/scipy,vigna/scipy,lhilt/scipy,ilayn/scipy,gertingold/scipy,matthew-brett/scipy,jamestwebber/scipy,mdhaber/scipy,rgommers/scipy,pizzathief/scipy,scipy/scipy,gertingold/scipy,e-q/scipy,WarrenWeckesser/scipy,andyfaff/scipy,zerothi/scipy,Eric89GXL/scipy,rgommers/scipy,vigna/scipy,aarchiba/scipy,tylerjereddy/scipy,anntzer/scipy,andyfaff/scipy,endolith/scipy,grlee77/scipy,matthew-brett/scipy,scipy/scipy,anntzer/scipy,arokem/scipy,Stefan-Endres/scipy,nmayorov/scipy,perimosocordiae/scipy,jor-/scipy,vigna/scipy,vigna/scipy