Extensible GL extension support

Moves extension logic close to actual use and ensures that the same extensions are loaded across all apps.

Supersedes #699.