Updated measureString to return 0 for an empty string.
In autoGrow, track the input's current width in a closure rather than
using jQuery .width() to see if the width needs updating.