The variable current gun: the parameter tests and the results of the first electron cooling experiments at LEAR