McDiarmid-Type Inequalities for Graph-Dependent Variables and Stability Bounds