Add method cache to BehaviorRegistry.

By caching the reflection results, we don't have to waste time
duplicating any reflection work. Classes in PHP are immutable, so we can
rely on their methods not changing.

Caching also gives a signifcant performance boost when the same behavior
is used multiple times.