This is a memoization technique. I don't want to initialize a SoundManager sound until I need to, but I also don't want to have to wait until I have tried to initialize it in the event that it already exists.

The interface I came up with is this SoundFactory (sort of a misnomer). A soundFactory is a function which returns a sound, but it also has the property `sound` which will be set to the sound that the function will return if the sound is initialized.

The value that gets passed to this directive might be a factory, and it might be just a sound object (depending on the context we're coming from), so I wrap it in this fake soundFactory regardless.

The loop here isn't necessary anymore because the code starting on line 113 was turned into a loop. I used to set whatever value was passed in as the `sound` property on this soundFactory, which necessitated looping in situations where it might be nested. I also changed it so that I set the `factory` property with function values instead of the `sound` property, so I think that the loop there might not be necessary anymore either. I admit I am not in exactly the same headspace I was in a couple days ago when I wrote this, but I'd just have to test removing it. I think this will more robustly handle anything that conforms to the interface I have defined here, but we shouldn't be expecting to receive anything that conforms to this interface - we should be expecting only things which conform to the (simpler) interface without the possibility of nested functions.