This utility function is useful outside of epan. Move it to wsutil and export the interface. The move isn't completely clean as it requires duplicating two small inline functions but that was necessary to avoiding moving too much at once.