Fix polymodel writing on x64

Packed writing a structure containing a pointer, but reading it as an
int, is wrong on x64.
Use unique_ptr for model_data
Fix reading HXM polymodels on x64
Inline polymodel_read_n