The company behind NJ.com has turned a local newsroom’s audience into a marketing business. Its most useful lesson starts before anyone buys an ad.