Chemical routes for production of transition-metal phosphides on the nanoscale: implications for advanced magnetic and catalytic materials.