Upwind Residual Distribution Schemes for General Hyperbolic Conservation Laws and Application to Ideal Magnetohydrodynamics