Matrix solitons and bundles over curves with singularities