bastion: convert into a module

Change-Id: I77fa4011905f3fb0bca32680a64da154e5cd9bf8