Complete function scanning

This ports the rest of the function scanning over from PPSSPP. It probably adds more time to the startup, but it's also much more accurate now.