release weak ref to detail view upon removing

Not every object model will release the view after removal. Keeping it around
outside this library used to crash outside the row bounds. Now, a different guard
clause is used in -removeDetailRow. Re-arranges the code a bit.