title: Phalcon: Cannot use alias column in where/having clause
body: <p>I have to select some location points with a distance from given coordinates. 
  Presented query </p>
  
  <pre><code>$locations = Locations::query()-&gt;columns(['id','distance' =&gt; '(1+2)'])
                  -&gt;order('distance')
                  -&gt;having('distance &lt; 10')
                  -&gt;execute();
  </code></pre>
  
  <p>produces error:</p>
  
  <pre><code>SELECT id, (1+2) AS distance FROM [Multiple\Base\Models\Locations] GROUP BY [distance &lt; 10] ORDER BY distance (116)...
  </code></pre>
  
  <p>Why can I use 'distance' alias with order clause, but cannot with having/where?</p>
  
  <p>How to get it?</p>
  
  <p>The query below works, but i need to order resultset by distance and use distance in views...</p>
  
  <pre><code>$locations = Locations::query()-&gt;columns(['id'])
                      -&gt;having('(1+2) &lt; 10')
                      -&gt;execute();
  </code></pre>