A study of nucleation, growth, texture and phase formation of electrodeposited cobalt layers and the influence of magnetic fields