Gravar-mail: A flexible and robust approach for segmenting cell nuclei from 2D microscopy images using supervised learning and template matching