glamor: Fix memory leak in put_image

Signed-off-by: Markus Wick <markus@selfnet.de>
glamor: Fix no-mipmap allocations

With GL_TEXTURE_MIN_FILTER, we configure not to use mipmaps, but we don't configure to not have them.
Some driver allocate the complete texture + all mipmaps at once, so they will still allocate them.
GL_TEXTURE_MAX_LEVEL however disable the mipmaps at all, so eg nvidia stop spamming vram wasting warnings.

Signed-off-by: Markus Wick <markus@selfnet.de>
glamor: Choose max fbo size by texture + viewport size

The max size of renderbuffers and texture often match by accident, but as we always use textures, we should check for the right flag.
Also check for viewport size as this may be lower and we want to render to almost every pixmap.

Signed-off-by: Markus Wick <markus@selfnet.de>