Effect of orientation and mobility of polymer molecules at surfaces on contact angle and its hysteresis