Fix rebuild_server() function

The rebuild_server() function defined in the v2 and v3 base test
classes made some incorrect assumptions about variable scoping
because the method is set as a class method. This commit fixes this
method to behave properly so that it doesn't reference variables
outside it's scope.

Change-Id: I7d0ee6e0c0784952634b157187ca47f7afbcadf1
Merge "Fix rebuild_server() function"