WebMIDIAPI.js cleanup

added curly braces to for and if statement. This should make the code intention clearer. Also cleaned up the anonymous function expressions, adding a space between "function" and "("