Add foreign key and not null DB constraints

Install foreigner gem and implement foreign key constraints on tasks,
pomodoros, and intervals.

Implement not null constraints on tasks, pomodoros, and intervals.