Move repeated code for creating a test ve.ui.Surface in utils

Pattern is used in half a dozen places, so let's use a utility function.

Change-Id: I3e2d0024f0a2887c32ba96537195dd374a11c560
Merge "Move repeated code for creating a test ve.ui.Surface in utils"