[lib] Update platform.supports to use Cordova promises.