base1: Add cockpit.resolve() utility function
base1: Add cockpit.resolve() utility function

This creates a new defered, resolves it, and returns its promise.

This is useful for implementing promise-based apis that can be
sometimes resolved immediately - e.g. returing value from cache.

matobet/cockpit,matobet/cockpit,matobet/cockpit,matobet/cockpit,matobet/cockpit,matobet/cockpit