fix solver

Fix a few minor indexing bugs in solver

Implement Bland's Rule for choosing column and row pivots.