AudioData now deletes any memory it owns.

If rawSamples* is owned by an AudioData object, it will be deleted
during destruction, this is the case for loaded audio files.

Also, a few ugly casts were removed.