Add NONE type for resource and direction enum, to use as placeholder.
flag: Store flag resources as resource_slot_t.

Uses RESOURCE_NONE and DIR_NONE as placeholders instead of confusing offset-by-one encoding.
Direction is stored separately and should therefore be set to DIR_NONE whenever the type field is changed to something other than NONE.