Correctly distinguish between Deferred and Promise

Deferred is read-write, Promise is read-only. Document and return
the correct types.

Change-Id: Icfd6efb07b222c73d49b97ddbfe6565b8542ad00
Merge "Correctly distinguish between Deferred and Promise"