Flags to item factory

Gives the item factory the ability to handle standard item flags. Doesn't yet cover techniques or other special flags.

Also fixed a wish menu bug related to json items. In the loosest sense of the word "fixed". I now push the keys from jsonized items back to the standard_itype_ids global.