fix(subjectcodes): use qcode instead of code
[SD-945] Improvements:
                        1. Reusing the variables instead of asking the dict() again.
                        2. Refactored few lines to a function().
                        3. Adding a behave test for testing Metadata
                        4. Anpa Category has to be dict type, not string
[SD-1051] Second Issue is fixed
Merge pull request #352 from petrjasek/fix-subjects

fix(subjectcodes): use qcode instead of code
Remove duplicated abstract field, merge issue.
[SD-668] Adding needs_activation to False for AD users and refactored the repetitive code to a function
Merge remote-tracking branch 'upstream/master'