Cache type variable index for performance reasons

Description

While doing some profiling on cascaded and collection validation a `TypeVariables#getTypeParameterIndex()` showed pretty high and it looks that we can omit calculating it at runtime. After the changes here are some benchmark results:

Environment

None

Status

Assignee

Marko Bekhta

Reporter

Marko Bekhta

Labels

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Minor
Configure