Initial pass at merging existing Replace UI into a single modalbar (but not
yet picking up any of the enhanced functionality from Find)
Reuse Find code for Replace bar, so it benefits from incremental search,
result highlighting, tickmarks, result count, etc. They are still separate
commands for now, with Find having a simpler UI.
Find/Replace UI:
* Treat Enter as Find Next instead of closing the bar. Removes Enter key
handling and "commit" event from ModalBar.
* Move error message into popup & clean up how its shown/hidden. Make text
field border red whenever error is shown. Same for FindInFiles, as well.
* Remove redundant "Skip" button in Replace UI
* Make next/prev and Replace/All button pairs flush
* Move result-count label inside search field
* Fix all existing unit tests (removing some that are no longer applicable
with the new Enter key behavior).
* Add regex & case-sensitive toggle buttons to Find/Replace UI instead of
deciding based on heuristics. (NOT changed in Find in Files yet, though)
* Change Find Next to use editor cursor pos rather than an invisible saved
pos (part of future story "Correct Find Next behavior", but also simplifies
code). With simple unit test.
* Make all Find/Replace buttons non-tabbable for now, to match existing
next/prev buttons
* Move Find in Files "no results" message back into search bar (as opposed
to drop-down error popup)
* Hide regexp error popup when sliding out Find in Files bar, just as we
do for Find/Replace
* Fix existing bug in Find in Files where prepopulated regexp text was not
checked for errors
* Use regex/case toggle buttons to Find in Files UI also
* Persist regex/case toggle state as a pref (shared across Find, Replace &
Find in Files)
* Unit tests for new Sprint 35 find/replace features
* Replace keyboard shortcut acts like clicking the Replace button while
search bar is open
* Show keyboard shortcuts in search bar tooltips
* UI polish: make regex/case option snug with search field; make replace
buttons snug with replace field; don't overlap borders of snug buttons
(caused border to appear darker when disabled due to alpha)
* Fix bug with non-regexp Find in Files searches
* Move Find/Replace UI into a template (must use a hack to hide linebreaks
from the browser though, since whitespace changes the spacing between
neighboring inline elements).
* Force Tab/Shift+Tab to cycle between the two fields in Replace bar,
instead of closing it. Tab behavior unchanged (vs. master) in Find &
Find in Files bars.
* If Replace bar wraps due to very narrow window, break only at the gap
between the Find UI & Replace UI.
Fix bug where Find/Replace and FindInFiles search bars might be open at
same time for an instant (one sliding in while the other sliding out). Since
more of the UI uses overlapping names now, that causes more problems than
in the past.
Ideally, ModalBar would enforce that only one is open at a time, but the
close() options are too tightly controlled by the clients right now
(especially QuickOpen). So we use a side channel to ensure that the two
modal bars that now conflict directly (FindReplace, FindInFiles) don't
overlap.

Also, small cleanups: use double quotes in HTML templates; use underscores
for FindReplace APIs intended to be called only by FindInFiles.
Merge pull request #6175 from adobe/pflynn/findreplace-ui

Improved Find/Replace UI