Add the definition of isSafe for the n-queens problem

The only remaining bit is the isSafe method, which is used to check
whether a given queen is in check from any other element in a list of
queens. Here is its definition.

The isSafe method expresses that a queen is safe with respect to some
other queens if it is not in check from any other queen. The inCheck
method expresses that queens q1 and q2 are mutually in check. It returns
true in one of three cases:

  1. If the two queens have the same row coordinate,
  2. If the two queens have the same column coordinate,
  3. If the two queens are on the samediagonal, i.e., the difference
     between their rows and the difference between their columns are
     the same.

The first case, that the two queens have the same row coordinate, cannot
happen in the application because placeQueens already takes care to
place each queen in a different row. So you could remove the test
without changing the functionality of the program as a whole.

However, we'll leave the first test in for now, as it represents the
correct complete definition of whether a queen is in check by another
queen anywhere on the board.