Function resolveStorageAdapter

Resolves the most appropriate storage adapter for the current runtime. Tries candidates in the supplied priority order and falls back when one fails.