Optimal Routing and Power Allocation for Wireless Networks with Imperfect Full-Duplex Nodes