virbitmap: Refactor virBitmapParse to avoid access beyond bounds of array