Check isValid() in user provided states
Implementation of #359 (closed) helps to debug properly when a state (with local param) is not valid, now we don't get a strange ceres error, an assertion is failing in SolverManager::addStateBlock
and SolverManager::updateStateBlockState
instead.
However,the main reason why we could have a wrong state is in user defined states. We should check validity of user defined states.