lib/flow: Introduce miniflow_extract().