Refactor logic for reading and writing application and session settings:
* Introduce TAppSettings, created in dpr file
* Implement read and write methods, and replace callers of GetRegValue and MainReg.WriteInt/... with these
* Optimize read and write methods for avoiding redundant accesses to registry
* Auto-remove stored default settings from registry to avoid registry spam
* Replace synced MainForm.pref* variables with TAppSettings.Read* calls
* Move SetLocales call to dpr file
* Move MainForm.FDirname* variables to appropriate methods in helpers.pas
* Implement TQueryHistory.Create(SessionPath), reading its items within constructor
 

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4171 560a3889-bb33-0410-9f33-43a8a102dc09
Pass missing plink executable setting. Fixes issue #2931.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4172 560a3889-bb33-0410-9f33-43a8a102dc09
Use j, not i, for a check whether a recent filter item has a numeric name. Fixes issue #2932.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4173 560a3889-bb33-0410-9f33-43a8a102dc09
Add a second label to below the processlist, called "EXPLAIN Analyzer on MariaDB.org", which passes the EXPLAIN output to http://mariadb.org/explain_analyzer/api/1/ . Thanks to Bryan Alsdorf for support.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4174 560a3889-bb33-0410-9f33-43a8a102dc09
TAppSettings.ValueExists respects SessionPath, which is not used in GetSessionNames, so prefer FRegistry.ValueExists here. See http://www.heidisql.com/forum.php?t=11020

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4175 560a3889-bb33-0410-9f33-43a8a102dc09
Give both dropdown and edit box the same width. See http://www.heidisql.com/forum.php?t=11039

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4176 560a3889-bb33-0410-9f33-43a8a102dc09
Introduce property LogToFile in TMainForm, which is synced with the registry setting asLogToFile. Fixes issue #2936.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4177 560a3889-bb33-0410-9f33-43a8a102dc09
Add "Include auto increment column" checkbox option onto grid export dialog. Fixes issue #2864.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4178 560a3889-bb33-0410-9f33-43a8a102dc09
Detect auto increment column id once after querying and use a simple variable AutoIncrementColumn, not via function ColIsAutoIncrement. Simplifies previous commit.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4179 560a3889-bb33-0410-9f33-43a8a102dc09
Add "Include query" checkbox option onto grid export dialog. See http://www.heidisql.com/forum.php?t=10853

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4180 560a3889-bb33-0410-9f33-43a8a102dc09
Use "\N" without enclosing chars for NULL values in CSV export, not an empty string. Just like MySQL does in a SELECT .. INTO OUTFILE.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4181 560a3889-bb33-0410-9f33-43a8a102dc09
Silence conversion errors while reading query history from registry. See pm from Thomas Hauck.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4182 560a3889-bb33-0410-9f33-43a8a102dc09
Fix and enhance handling of multiple statements and multiple results:
* TMySQLConnection.Query did not process further results if the first one is a non-result. Instead, it disconnected you as the required mysql_store_result() was never called. Fixed now. Should fix the error described here: http://www.heidisql.com/forum.php?t=11049
* Cache result of SHOW VARIABLES, and introduce a MaxAllowedPacket function, which benefits from that cache
* Do not limit the number of statements in "batch in one go" mode, only limit its size. This is to minimize the number of sent packets for a huge numbers of very small queries.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4183 560a3889-bb33-0410-9f33-43a8a102dc09
Assume user wants default length/set for columns of an existing table, until he enters some new value. Fixes issue #2942.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4184 560a3889-bb33-0410-9f33-43a8a102dc09
FHostListResults needs its own copy of a SHOW VARIABLES result, to overcome invalid pointer operations when freeing the result within TMySQLConnection.GetServerVariables. Fixes issue #2943.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4185 560a3889-bb33-0410-9f33-43a8a102dc09
Tweak grid export dialog with some minor enhancements:
- Auto select ANSI encoding for Excel output, see http://en.wikipedia.org/wiki/Comma-separated_values#Application_support
- Auto modify file extension when selecting format
- Support "Include query" checkbox in XML format, see http://www.heidisql.com/forum.php?t=10853#p11082
- Imitate mysqldump's XML style, see http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html#option_mysqldump_xml

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4186 560a3889-bb33-0410-9f33-43a8a102dc09
Fix confusion in save-as-dialog. Fixes issue #2921.

git-svn-id: http://heidisql.googlecode.com/svn/trunk@4187 560a3889-bb33-0410-9f33-43a8a102dc09