added NaN test for check_matching_dims
added doc in code for check_matching_dims
Merge pull request #921 from stan-dev/feature/issue-891-check-matching-nan

Feature/issue 891 check matching dims nan