GraphicsResource.Dispose() requires GraphicsDeviceManager

Do not attempt to call `GraphicsResource.Dispose()` without a valid `GraphicsDeviceManager`.

Fixes issue #2805