From Hankel operators to Carleson measures in a quaternionic variable