First principles crystal engineering of nonlinear optical materials. I. Prototypical case of urea.