Support for middlewares.

Every middleware should extend the Kernel class, and can be loaded into the app through
$app->kernel(Kernel);