Fix support for unaligned loads and stores

This patch reverts 42ea326b24d35a8e3036bd6e7c91ed4b522e9dd3, since broke
handling of misaligned loads and stores, and adds tests for unaligned
loads and stores.