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)
```
Yeah, that's why I put the @TODO in there. The old code didn't check for interactive, so I made this version act the same way, but like you, thought it was wonky

> On Nov 6, 2014, at 07:27, Tom Sellers <notifications@github.com> wrote:
> 
> In lib/msf/ui/console/command_dispatcher/core.rb:
> 
> >  
> > -        if sid
> > -          print_status("Running script #{script} on session #{sid}...")
> > -          sessions = [ sid ]
> > -        else
> > -          print_status("Running script #{script} on all sessions...")
> > -          sessions = framework.sessions.keys.sort
> > +      sessions.each do |sess_id|
> > +        session = verify_session(sess_id, true)
> > +        # @TODO: Not interactive sessions can or cannot have scripts run on them?
> > +        if session == false # specifically looking for false
> > +          # if verify_session returned false, sess_id is valid, but not interactive
> > +          session = framework.sessions.get(sess_id)
> Was the intent here to just provide a warning on a non-interactive session because this code checks for interactive and, if false, binds anyway. After taking a quick glance at the scripts folder I don't see anything that stands out to me as something that would work if the session is non-interactive.
> 
> Who would be a good person to query on this?
> 
> —
> Reply to this email directly or view it on GitHub.
>