Implement flags per model

Squashed commit of the following:

commit 2c6dbc6b91739ef8ab97940f1af74c5be80c07a4
Author: Jelle De Loecker <jelle@codedor.be>
Date:   Fri Mar 14 10:52:48 2014 +0100

    Implement 'delete' flag

commit f2fa40ad64212709a6e235309daf408921252645
Author: Jelle De Loecker <jelle@codedor.be>
Date:   Thu Mar 13 15:52:30 2014 +0100

    Begin work on model wide flags