remount: Move more stuff out of do_remount.

This moves more logic out of do_remount and into main(). This eliminates
some redundant code.

Bug: 241179247
Test: remount
Change-Id: I212bdb0e97016dec50618962d7c24f46d35764c7
1 file changed