When does Wenzel's extension of Young's equation for the contact angle of droplets apply? A density functional study.