Heinz Australia has launched an investigation into how a can of branded spaghetti came to contain "black sludge".