[DBAL-959] Allow to get bound parameter types from query builder

Replaces https://github.com/doctrine/dbal/pull/648.

Added tests.