When my mouse cursor size is greater than 40 (I have bad vision and use 48 most of the time), and while using compiz, when dragging windows the mouse cursor is surrounded by a square of of garbage and leaves trails, and the cursor glitches and/or disappears when it mouseovers links in a webpage:
Example of glitching and trails.

This sounds like what happens when the X server falls back to software cursors on top of an OpenGL client like compiz. However, the maximum hardware cursor size is 64x64, not 40x40 so it's surprising to me that it's falling back for that size cursor. Can you please provide instructions on how to download and install the specific cursor theme you're using?

The particular theme I use is redglass, but it happens with whiteglass as well.

To install this I'd suggest using the package management tools with your distribution, since most (at least debian, arch, and ubuntu) include this package: xcursor-themes

If you distrubtion doesn't have such a package though, you could use this command with the Arch package above, although I don't know if the Arch filesystem hierarchy is similar to whatever distribution you use and therefore it may not untar the files in the locations that your distribution expects them:
sudo tar -xvpf /path/to/xcursor-themes-1.0.2-1-any.pkg.tar.gz -C / --exclude .PKGINFO