Balance laws as quasidifferential equations in metric spaces