Extracts a lambda body to a method and converts the lambda to a method reference.