the first draft of transparent API and UMat implementation

DO NOT MERGE!

This is just for review and to see how well (or how bad) it goes on buildbot.