Add tests for multipart HASH indexes.

Derive some tests for multipart HASH indexes
from the original implementation by A. Demakov
before dropping the branch.