The nested Bethe ansatz for ‘all’ open spin chains with diagonal boundary conditions