Fix d3.layout.stack for empty input array.

Fixes #2004.