Start catching out of memory errors
Check malloc return codes
Merge pull request #2 from e9925248/master

Start catching out of memory errors
make sure we include stdlib.h before wavpack_local.h so that the byte-order stuff is defined (on Linux) - before this we had different versions of the Bitstream structure defined for different modules, although I do not think it was causing any issues