use djangos method of wiping sqlite3 tables

Django uses a reference graph to determine the order
in table deletions that occur. Do the same here.

This commit also adds in the `REGEXP` sqlite function,
exactly how Django uses it in its reference graphing.

Signed-off-by: Kevin Morris <kevr@0cost.org>
1 job for pu_test_prep_db in 2 minutes and 13 seconds (queued for 2 seconds)