reverse-merged from commit 622b3232c54f132c09819906fb4ea29e8d995d35. aggregate progress moved to sparql1.1 branch.