[api] create "deleted" project and repository when needed

fixing github openSUSE/open-build-service issue 812

Conflicts:
	src/api/app/models/project.rb
	src/api/test/unit/code_quality_test.rb