Bug 1045270 - Part 1: Cache the selection state for the native anonymous text box inside number controls on the number control itself; r=smaug

This is needed because the text control and its nsTextEditorState will
die together with the text control's frame.
Bug 1045270 - Part 2: Focus the text control inside a number control when recreating frames for a focused number control off of the event loop; r=smaug

This is needed because the text control doesn't have a document yet in
CreateAnonymousContent, so setting the focus to it will fail.
Bug 1045270 - Part 3: Add a test case; r=smaug