RIM surprises with cash boost and resilient sales; shares surge