US producer inflation cools to 4.7% as energy costs fall