Nonbank funds lend directly to midsize companies and buyouts, raising money from pension funds and insurers.