This commit optimizes session attribute saving by ensuring batch updates are used whenever possible. To make this possible, delta now tracks operations for each attribute change in order to be able to deduce SQL operation. Additionally, if there is only a single attribute change, regular update is executed rather than batch operation. Closes gh-1051