Ryan Thomas, 38, has battled against the odds to survive after his heart stopped for an hour