sllist: Fix removal and sort bugs

Fix some bugs during iteration removal and sorting; added more tests to
that effect

Change-Id: I17ab9a143e56f9c0ba328a41bbae3ba650771280
Reviewed-on: http://review.couchbase.org/36276
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>