The decomposition of 3-dimensional Poincaré complexes