ISPN-5104 Infinite loop in TransactionAwareCloseableIterator when
iterating through cache

Fixed issue where entry was repeated if added to context after
starting a transaction
Generate the component metadata file in the generated-resources directory, so that it doesn't force a recompile of the module every time.