Add placeholders for IE9

Add manual placeholders for IE9 (and any other browser that doesn’t
have native placeholder support). Some minor javascript refactoring to
support it.