Added cudamat.where function.

This function works analogously to numpy.where.