Check Gadget name is a valid ResourceLoader module name

When loading the Gadget list, check against ResourceLoader::isValidModuleName
to avoid MWExceptions being thrown.

This will lower the max length of a gadget name from 248 bytes to
244 since ResourceLoader requires <= 255 bytes, and we add a
"ext.gadget." prefix in front of the name.

Bug: 19410
Change-Id: Ib74c0866bb333885c747d318418e2c8685ae339c