Session Management: Allow killing multiple specific sessions

The intent of this change is to allow the user to specify multiple sessions to kill when using the sessions -k switch.  This uses the `build_sessions_array` function added in PR #3401 which is now landed.

    sessions -k <session id range> 
    sessions -k 1,3,5-8

EDIT:
With the help and feedback from @kernelsmith and @wvu-r7 this PR has been expanded to support specifying ranges for the command, detach, and script options of ````sessions```` as well as the kill option of ````jobs````.   There has been additional code cleanup performed in the areas of the module that were touched in this PR.

Here is an example that specifies a single session, a range, and an invalid session ID.

```
msf exploit(psexec) > sessions 

Active sessions
===============

  Id  Type                   Information                    Connection
  --  ----                   -----------                    ----------
  1   meterpreter x86/win32  NT AUTHORITY\SYSTEM @ WINDC01 192.168.180.102:8343 ->192.168.190.210:49526 (192.168.190.210)
  2   meterpreter x86/win32  NT AUTHORITY\SYSTEM @ WINDC01 192.168.180.102:8343 ->192.168.190.210:49528 (192.168.190.210)
  3   meterpreter x86/win32  NT AUTHORITY\SYSTEM @ WINDC01 192.168.180.102:8343 ->192.168.190.210:49529 (192.168.190.210)
  4   meterpreter x86/win32  NT AUTHORITY\SYSTEM @ WINDC01 192.168.180.102:8343 ->192.168.190.210:49530 (192.168.190.210)
  5   meterpreter x86/win32  NT AUTHORITY\SYSTEM @ WINDC01 192.168.180.102:8343 ->192.168.190.210:49532 (192.168.190.210)
  6   meterpreter x86/win32  NT AUTHORITY\SYSTEM @ WINDC01 192.168.180.102:8343 ->192.168.190.210:49533 (192.168.190.210)

msf exploit(psexec) > sessions -k 1,3-5,7
[*] Killing the following session(s): [1, 3, 4, 5, 7]
[*] Killing session 1
[*]192.168.190.210 - Meterpreter session 1 closed.
[*] Killing session 3
[*]192.168.190.210 - Meterpreter session 3 closed.
[*] Killing session 4
[*]192.168.190.210 - Meterpreter session 4 closed.
[*] Killing session 5
[*]192.168.190.210 - Meterpreter session 5 closed.
[-] Invalid session identifier: 7
msf exploit(psexec) > sessions 

Active sessions
===============

  Id  Type                   Information                    Connection
  --  ----                   -----------                    ----------
  2   meterpreter x86/win32  NT AUTHORITY\SYSTEM @ WINDC01 192.168.180.102:8343 ->192.168.190.210:49528 (192.168.190.210)
  6   meterpreter x86/win32  NT AUTHORITY\SYSTEM @ WINDC01 192.168.180.102:8343 ->192.168.190.210:49533 (192.168.190.210)
```
No. Leftover. It was actually there to help pinpoint the problem with -c getuid etc but I forgot to pursue that

-Josh

> On Nov 6, 2014, at 07:22, Tom Sellers <notifications@github.com> wrote:
> 
> In lib/msf/ui/console/command_dispatcher/core.rb:
> 
> > -              end
> > -              if process and process.channel and (data = process.channel.read)
> > -                print_line(data)
> > -              end
> > -            elsif session.type == "shell"
> > -              if (output = session.shell_command(cmd))
> > -                print_line(output)
> > -              end
> > +        sessions.each do |s|
> > +          session = verify_session(s)
> > +          next unless session
> > +          print_status("Running '#{cmd}' on #{session.type} session #{s} (#{session.session_host})")
> > +
> > +          if session.type == 'meterpreter'
> > +            # If session.sys is nil, dont even try..
> > +            print_good "Checking if session.sys"
> @kernelsmith Do we need this as default output?
> 
> —
> Reply to this email directly or view it on GitHub.
>