Comparing the importance of farming resource endowments and agricultural livelihood diversification for agricultural sustainability from the perspective of the food–energy–water nexus