Measurement of two-qubit states by a two-island single-electron transistor