first cleanup for linksys_wrt54gl_apply_exec

Hi @m-1-k-3,

This pull request references https://github.com/rapid7/metasploit-framework/pull/1703, trying to do a first cleanup, mainly try to refactor code into grab_config and minor fixes. I haven't a pcap for this pull request still, have I? Since I dont find the pcap I couldn't check it, hopefully my changes haven't break nothing :P Feel free to share a pcap with me and I'll be able to simulate to test changes by myself :) 

Kind regards