Replaced dit + 1 by dnext.
All pointer arithmetic is done by a second variable of the appropriate
type.
Updated end iterator checking in checkLocalReactions loop.
The stopping criterion for the loop in checkLocalReactions was the
vector::end() function for SlipPlane::defects. The trouble with this was
that the function would try to access elements beyond the end of the
vector defects in order to identify the local reaction. This has now
been corrected by updating the stopping condition to the penultimate
element of the vector.