WebMIDIAPI.js cleanup

added curly braces to the for and if statements. This should make the code intention clearer. Also cleaned up the anonymous function expressions, adding a space between "function" and "(" to avoid confusion (it looks like the name of the function is 'function', which is silly)