ENH+FIX: Epochs error info, fixing / making CUDA more efficient, refactoring rank computation function

Title says it all. CUDA enhancements/fixes are the main thing. I realized that I wanted to be able to estimate the rank for other things as well (e.g., STC files after running an inverse -- hooray the rank is preserved!) so I moved the main part of that to utils.py. I changed epochs because I was getting a less informative error when passing in no events on accident.