promote_scalar and promote_scalar_type functions defined, doc-ed and tested
moved promote_scalar all into math/matrix to deal with order-dependency of definitions
promote_scalar now working with arbitrary include order with static functor-like structs
refactored promote_scalar to allow matrix to be included after scalar/std-vector
bug fix to order of template arguments, additional test for var, plumbing for generator to ensure covariant returns
completed doc for every class and function in promote_scalar and promote_scalar_type
removed stray write to std::cout in generator.hpp
used vector indexing to avoid missing size_t on windows, used unsigned ints for sizes in tests to remove griping
Merge pull request #1045 from stan-dev/bugfix/issue-849-mixed-function-returns

Fixes #849. Bugfix/issue 849 mixed function returns