Cheesy scalloped potatoes with ham