dsm: refactorize

browser.c contains common browsing functions that can be used from a access_t
or a services_discovery_t.