tipc: relocate common functions from media to bearer