James scores 42, Heat pull away from Mavs 117-106