Move common plugin code to parent pom + REST API improvements

- Move common plugin code to parent pom
- Implement REST API expansion for entity collections