Fix a build break in gcc7
Fix a build break in gcc7

gcc7+ seems stricter than previous releases, and now requires
`<functional>` to be included in order to use `std::function`.

See also apple/turicreate#1122

apple/coremltools,apple/coremltools,apple/coremltools,apple/coremltools