[#744] Remove `sourceId` attributes from survey XML definition

* Remove `sourceId` attributes from the `question` and `survey` elements in the survey XML definition
[#744] Check for `null` references in caching logic

* Check for `null` references in caching logic from #651
[#744] Source code formatting

* Format source code
* Remove unused method `assembleSurvey`
Merge pull request #747 from akvo/issue/744_failed_publish_copied_survey

[#744] Surveys copied across instances cannot be published