Moved Cucumber hooks to hooks.rb file

Bug: 49812
Change-Id: Ib927b824a8854d1c4257a17db582595a22d70470