use assertSame and assertNotSame for etag checks

fix https://github.com/owncloud/core/issues/7436, split from https://github.com/owncloud/core/pull/7438, added type checking when using assertNotSame.

@PVince81 @bantu @DeepDiver1975 @MorrisJobke @schiesbn should now be an easy review.