[stable5] Skip non-oc tables on upgrade 

Do not validate alien tables in DB if oC shares the same DB with other software.

Resubmit of https://github.com/owncloud/core/pull/4029 for stable5
Requires 3rdparty https://github.com/owncloud/3rdparty/pull/43

Ref 
#3848
#3642

cc @DeepDiver1975