gdi32: Add a helper function to allocate the brush bits.