use to_char to allow comparing string to CLOB cloumns in oracle

I have no better idea than using to_char to compare strings to CLOB columns. Better ideas welcome. Until then give me a :+1: 

@karlitschek @DeepDiver1975 @bartv2 

Originally part of https://github.com/owncloud/core/pull/3583 but fixes two other occurences and does not use time() as a parameter because a comment says it will break sqlite ...