Fix dispose issues identified by Gendarme (part 1)

This patch mainly includes changes where we suppress the false
positives.

Change-Id: Iae3cf1b0b5c4711a82edc20443e9216745484c74