HEMF: fix(bug 61346)

fix by POI Developers (bug 61346) - HEMF: Add more sanity checks before allocation of byte arrays in HEMF/HWMF.