udisks2: split a helper function
udisks2: split a helper function

We'll need to use this later.

https://bugzilla.gnome.org/show_bug.cgi?id=676111

philipl/gvfs,xkahn/gvfs-cmis,xkahn/gvfs-cmis,gicmo/gvfs,halfline/gvfs,xkahn/gvfs-cmis,gicmo/gvfs,halfline/gvfs,philipl/gvfs,gicmo/gvfs,halfline/gvfs,xkahn/gvfs-cmis,philipl/gvfs,gicmo/gvfs