Why did the neutron star merger signal last for so much longer than the black hole merger signals?

It is not that the merger of two neutron stars takes longer, the inspiral and merger of a pair of neutron stars just spends a longer time in the frequency range where LIGO is most sensitive. Let me try to explain in more detail.

LIGO is sensitive only to gravitational waves with frequencies between approx. 10 Hz and 10 kHz. (See LIGO sensitivity curve). As has been much discussed in the press announcements, the gravitational waves from the merger of a compact binary follow a "chirp" pattern increasing both in amplitude and frequency until it cuts off at the merger. The maximum frequency reached is inversely proportional to the "chirp mass" a rather arcance combination of the masses of the two components of the binary.

The upshot of this, is that heavier binaries have a lower maximum frequency than lighter binaries. For the first event, GW150914, which was very heavy, this meant that LIGO was only sensitive to the very last part of the inspiral (only the last few cycles). The lightest BH binary merger to date, GW151226, already spent a lot more cycles of its inspiral in LIGO's sensitivity range.

Now neutron stars are obviously even lighter, allowing LIGO to see even more of the cycles of the inspiral before the merger (around 3000). In fact, for the GW170817, the final merger happens in a frequency range where LIGO is no longer that sensitive. The most accurate data is obtained from the inspiral phase.

It is because binaries of lower mass have a chirp frequency and amplitude that evolves much more slowly than for a binary of higher mass with the same orbital period. This is because the rate of orbital energy loss due to GWs is much higher for a higher mass binary.

There is no big difference between the GW signal produced by merging black holes and neutron stars of similar mass until just before the merger when the neutron stars can tidally deform. This point was reached at a frequency beyond LIGO's sensitivity and in fact the LIGO GW observations were not cpabale on their own of distinguishing between NS/BH binary possibilities. The difference between this LIGO GW signal and the previous BH binary detections is just due to the total mass of the systems involved, not their nature.

There are a few things going on here.

The amplitude of the signal from a merging binary is $$h \sim 10^{-22} \left(\frac{M}{2.8M_{\odot}}\right)^{5/3}\left(\frac{0.01{\rm s}}{P}\right)^{2/3}\left(\frac{100 {\rm Mpc}}{d}\right),$$ where $M$ is the total mass of the system in solar masses, $P$ is the instantaneous orbital period in seconds and $d$ is the distance in 100s of Mpc. $h \sim 10^{-22}$ is a reasonable number for the sensitivity of LIGO to gravitational wave strain where it is most sensitive (at frequencies of 30-1000 Hz).

The merging black hole sources previously seen by LIGO were much more massive than the merging neutron star binary by about a factor of 10-20. On the other hand, they were more than a factor of 10 more distant. Thus at a similar frequency (i.e. at the same orbital period) the neutron star merger produced a slightly lower amplitude than the black hole mergers.

Note though that the amplitude gets bigger as the period gets smaller (and the frequency gets bigger) and the binary inspirals. The time evolution of the frequency depends on the chirp mass, which is given by $$M_C = \frac{(m_1 m_2)^{3/5}}{(m_1+m_2)^{1/5}}$$ and the rate of change of frequency is $$\frac{df}{dt} = \frac{96 \pi^{8/3}}{5} f^{11/3} \left(\frac{GM_C}{c^3}\right)^{5/3}.$$

So at a given frequency, the rate of change of frequency and the rate of change of GW amplitude just depend on the chirp mass; the timescale to merger from a given frequency can be approximated as $\tau \sim f/\dot{f} \propto M_C^{-5/3}$.

For the merging neutron star binary, $M_C = 1.19M_{\odot}$. For the black hole binaries found so far, $9 < M_C/M_{\odot} <30$, so the frequency and amplitude evolution of these is far more rapid. For the black hole binaries this means that as they become visible in LIGO's sensitive frequency range ($> 20$ Hz), they are orbiting with a period of 0.1s, but their frequency is increasing at 50-200 times the rate at which is it increasing in a neutron star binary at the same orbital period. Hence the comparative timescales to merger of 1s vs 100s.