Error estimates for density-functional theory predictions of surface energy and work function