If the user types 'foo ' with a space, and the ajax call comes back
successfully, it replaces the 'foo ' with 'foo' (trimmed).
This causes inconsistent user experience as the user may have simply
paused while typing a space, and the space is then removed, mangling
his input. Note that this fix simply avoids trimming the user's visual
input, while still sending a trimmed value to the server.