Feature/issue 891 check ordered nan

#### Summary:
Added NaN test and doc in code for check_ordered. Also added std::vector version of check_ordered with tests.

#### Intended Effect:
Added NaN test and doc in code for check_ordered.

#### How to Verify:
Run test/unit/math/error_handling/matrix/check_ordered

#### Side Effects:
None.

#### Documentation:
Added doc in the code.

#### Reviewer Suggestions:
Anyone.