stand/ofw: Refactor ofw parsedev
Both ofw_disk and ofw_net use the same parsedev routine, except for the
string passed in to match the ofw device node's type. Create a routine
to do that and connect these two users up to that.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D37560
(cherry picked from commit f9ce8da86434867e1e7172fb56a5504f91c98ce4)