Added memory querying functions.

These are based on an ATI and nVidia extensions. I also could not add this to
smoke test because my computer, at the moment, is running on Intel.