Cheesy scalloped potatoes and ham casserole