Merge branch 'develop' of https://github.com/stan-dev/stan into develop
fixes issue #1078 by removing duplicate functor definition for forward declarations of user-defined functions
broke out return and intermediate real scalar types for user-defined functions
Merge pull request #1080 from stan-dev/bugfix/issue-1078-recursive-funs

Fixes #1078. Bugfix/issue 1078 recursive funs