Add tests inspired by Derby bugs.
Update history.
[OPTIQ-386] Fix NOTICE

Close apache/incubator-optiq#16