Bugfix: Sound allocation code to re-use existing IDs was referencing index -1
Several bugfixes and enhancements:
(1) Improper sound_channel (index i instead of j) was being stopped.
(2) Checking for NULL sounds was never done.
(3) Using vector.insert() was actually causing the vector to add 2 elements per sound, and allowed improper sound overwriting.
(4) GM doesn't actually re-use sound IDs, which avoids the case where stale sound IDs suddenly become relevant again.
(5) sound_add_from_buffer() was leaking memory (by immediately overwriting the empty SoundResource* that sound_allocate() added).
Merge branch 'audio_fix' into cp_filenames
Bugfix: If sound_add_from*() specifies a custom ID, make sure our auto-generated IDs won't conflict.
Merge branch 'audio_fix' into cp_filenames
Moved timelines code into a class on the inheritance hierarchy of object_basic. This is needed for script-local timeline code.
Timelines now generate object-local copies for relevant scripts. A virtual lookup is created per-object (but only for the timelines it uses, if any).
Merge branch 'timelines_with_scr' into cp_filenames

Conflicts:
	events.res
Copy local timeline variables into local objects.
Merge branch 'timelines_with_scr' into cp_filenames

Conflicts:
	CompilerSource/compiler/components/parse_and_link.cpp
Actions-based timelines are now properly recorded too.
Merge pull request #775 from sorlok/audio_fix

Many OpenAL fixes
Timelines and scripts interleave their dependencies seamlessly now. Allows chaining timelines and scripts, and correctly factoring back the variables, scripts, and timelines found in each layer.
Merge branch 'timelines_with_scr' into cp_filenames

Conflicts:
	CompilerSource/compiler/components/parse_and_link.cpp
TESTINT: It seems like most scripts should be copied locally?
Optimization: bounds check within a bounds check; it will already have passed.
EXPERIMENTAL: We have the object inst, so why don't we use it?
Merge branch 'with_other' into cp_filenames
bugfix: calling scripts locally requires this.