[SPARK-1860] More conservative app directory cleanup.

Before, the app-* directory was cleaned up whenever its timestamp was
older than a given time. However, the timestamp on a directory may be
older than the timestamps of the files the directory contains. This
change only cleans up app-* directories if all of the directory's
contents are old.