Add bitmask type

Adds support for arbirtrary number of OpenMP threads

Fixes #1386

Change-Id: I3747b4c7cd4b45d5901f710fcab47984c8913bc6