Make wrapped functors in internal_functional.h mutable

Fixes #516
Merge pull request #528 from jaredhoberock/issue-516

Make wrapped functors in internal_functional.h mutable