backend improvements, take 2

As pull #470 but integrating Gunnar's cleanup on error handling and also HSEARCH-1391

- https://hibernate.atlassian.net/browse/HSEARCH-1389
- https://hibernate.atlassian.net/browse/HSEARCH-1390
- https://hibernate.atlassian.net/browse/HSEARCH-1391