Put check for n > 1 AbstractDim in codegen

Wasn't clear how to do the comparison technically correctly, although
the workaround was probably fine.  This is cleaner though.

I didn't test the generated code for correct results from the solver,
just checked that the code generates and in case of C compiles.
Bugfix C codegen

Tried to refactor but messed up generator state.
Merge pull request #39 from chinasaur/ad/1

Put check for n > 1 AbstractDim in codegen
added more text to userguide
fixed a bug with python matrix mul
fixed python mul codegen
fixed possible matlab bug
added some documentation to fir example. fixed restricted multiply mixin
strange bug in restricted multiply C codegen
fixed a codegen bug with problems having *only* equality constraints.
fixed examples to work with new 'save' mechanism
restricted multiplication test
fixed python save. updated userguide
added codegen discussion to userguide. modified lasso example
finished userguide
Merge branch 'master' of github.com:chinasaur/qcml