[gdb/testsuite] Improve gdb.base/watchpoint-unaligned.exp

Improve the part of gdb.base/watchpoint-unaligned.exp handling
write_size8twice:
- move the code into a proc
- use -wrap
- use $decimal more often
- don't use gdb_test_multiple $test $test
- add comments
- start test when entering write_size8twice function, instead of main
- finish test when leaving write_size8twice function, instead of main
- add insn in between:
  - insn triggering watchpoint, and
  - insn triggering breakpoint
  to ensure that the watchpoint triggers before the breakpoint, and
  add a comment explaining this.

Tested on x86_64-linux.
2 files changed