Greatly reduce code duplication in rspec tests of db::mysql

Use shared examples to avoid duplicating tests for both platforms.

Change-Id: I16a77a284070e243c2a46675af419e635a139969
Merge "Greatly reduce code duplication in rspec tests of db::mysql"