v3d: implement OpenGL logic operations
@anholt: It is missing an implementation for MSAA render targets for now, but I think we can review and land this first and I'll tackle MSAA right after (we also need to write specific tests for that).
Testing coverage for this is not great, there are a few tests in piglit but I think we might want to write more tests to cover at least 32-bit formats and MSAA.