Use two template arguments in FunctorKey invocation

This lets us support implicit conversion in FunctorKey-based set.
FunctorKey-based const reference access should be a const method.