Making tiny loans to poor entrepreneurs in developing countries has long been a popular charitable cause, but it is now gaining traction as an investment.