Let me amend my description of the problem, because it's changed since last night.
When I originally tested charging the phone in a wall outlet, I was using a 5W adapter plug and was having the same intermittent charging problem as I was having when trying to charge from my Macbook.
Overnight I tested it with a 10W adapter plug and it charges just fine with no problems. So the issue must be something in how the computer allocates power to the USB port, or in the USB ports themselves. Charging it from the wall isn't an issue for me 99% of the time so I'm just going to do that, but it would be nice to be able to charge it reliably from the computer.