Fixed shallow water example
#1150 Warning instead of cassert failure when wrong reference count
Merge branch 'develop' of github.com:casadi/casadi into develop