N-representability and density-functional construction in curvilinear coordinates