BUG: io/wavfile: safer writing directly from buffer

Casting ndarray to a buffer fails for "non-native" datatypes in non-native byte order.
Since writing only cares about the bytes, we can as well make a byte view first.

Also test for a few more types.

Fixes gh-2928