Changed linesearch to use a LinesearchLocation rather than function value and projected gradient. Allow for non-gradient-based linesearches