1) In the first part of that code, Kohana is checking to see if your script is running from command line (CLI). If so, it tries to execute a task using Minion.
Minion is a framework for running tasks via the CLI.
See: https://github.com/kohana/minion
And: http://kohanaframework.org/3.3/guide/minion/
2) And yes that is method chaining that you are seeing in the second part of the code. It could just as easily be rewritten as:
$request = Request::factory(TRUE, array(), FALSE);
$response = $request->execute();
$response->send_headers(TRUE);
echo $response->body();