Define det and logdet for AbstractMatrix. Fix some unrelated ambiguity warnings triggered by that change.