Promise Timeout

Wraps a promise with a timeout so it rejects if it does not settle within a given duration.