Long-Term Finance and Investment with Frictional Asset Markets