Convert a pipeline into an elixir AST.
Because the plug chain is stored as essentially an abstract syntax tree we can perform any number of optimizations on it.