Update JFormFieldSQL to use JDatabaseQuery

### Use JDatabaseQuery
This PR update the JFormFieldSQL input field to use JDatabaseQuery with separated query elements.
Into your form xml file you can set the query using this way:
```
<field name="example_group" 
type="sql" 
label="COM_EXAMPLE_GROUP" 
sql_select="e.*" 
sql_from="#__example AS e" 
sql_group="name" 
sql_order="e.id ASC" 
key_field="id"
value_field="name" 
onchange="this.form.submit();" />
```
This example will recreate this query:
```
SELECT e.* FROM #__example AS e GROUP BY name ORDER e.id ASC
```
### Filters
One posibility that offer use JDatabaseQuery instead the old way is to have a way to get "inline" filters. That mean that if you have multiple dropdowns as filter in your list view, its posible that you need to connect it togheter.

For example, we have 2 dropdowns that filter our list, one called "groups", another called "subgroups":

```
<field name="groups" 
type="sql" 
label="COM_EXAMPLE_GROUP" 
sql_select="e.*" 
sql_from="#__example_groups AS e" 
sql_group="name" 
sql_order="e.id ASC" 
key_field="id"
 value_field="name" 
onchange="this.form.submit();" />
```
And the second:
```
<field name="subgroups" 
type="sql" 
label="COM_EXAMPLE_GROUP" 
sql_select="e.*" 
sql_from="#__example_subgroups AS e" 
sql_group="name" 
sql_order="e.id ASC" 
sql_filter="groups"
key_field="id"
 value_field="name" 
onchange="this.form.submit();" />
```
Note that we added **sql_filter="groups"**, that search for groups changes and set the condition if its founded. So we can have a 'inline' filter on our lists. This will recreate:

```
SELECT e.* FROM #__example_subgroups AS e WHERE `groups` = 99 GROUP BY name ORDER e.id ASC
```
`getUserStateFromRequest($this->context . '.filter', 'filter', array(), 'array')` will indeed only force the input to an array. You could pass any value you want using `&filter=foobar` in the URL and it will end up in the query. So you indeed need to sanitise this value before using or we will get a security issue.