Introduced DispatchChain interface and helper

It exposes the length of the polymorphic inline cache chains and derives cost from it.

Signed-off-by: Stefan Marr <git@stefan-marr.de>