MD Extensions polish: Update options dialog sizing logic.

 - Remove unwanted default paddings and border of cr-dialog.
 - Fix sizing logic to respect the user provided preferred values
   (with some constraints).
 - Simplify logic to size the options dialog, by using width: fit-content,
   (no need to use JS to calculate min-width for the title + icon).
 - Eliminate flicker (previously the dialog was re-sized twice).
 - Updated tests to use a real extension that specifies an options_ui in the
   manifest.json, to ensure that the onpreferredsizechanged logic works end-to-end.

Bug: 787234
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ic1e9b372c5889f08abc42cf1c460291b7b63062e
Reviewed-on: https://chromium-review.googlesource.com/786084
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Dan Beam (no longer on Chrome) <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520353}
8 files changed