Add support for LocalStorage, fallback to Cookies for api keys

Adding support for https://github.com/nelmio/NelmioApiDocBundle/issues/481

Missing:
- [ ] Review
- [x] Fallback to cookie storage
The whole implementation of this utility is bad. It should check first which storage is supported, and define functions accordingly instead of checking the storatge type each time a method is called. Extracting the logic to a separate utility has not made it cleaner.