remount: Refactor partition filtering into helper functions.

There is a small change of behavior in this patch. If "remount"
specifies a list of arguments, and one of them is invalid, it will now
error rather than try to remount the remaining partitions.

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