CMS-4256 Wrong behavior during content deleting: parent content can be ...

changes:
1.ContentResource.java- content will be deleted if it has no children
2.functional tests updated