QuickCheck properties for sidejob.

Only testing new_resource/3 and cast/2.
Minor edoc fixes.
[bug fix] Off-by-one error in is_available.

is_available returned false one worker too early. Counterexample:
  [{set,{var,1},{call,sidejob,new_resource,[bla,worker,2]}},
   {set,{var,2},{call,sidejob_eqc,new_worker,[1]}},
   {set,{var,3},{call,sidejob_eqc,cast,[{var,2}]}},
   {set,{var,5},{call,sidejob_eqc,get_status,[{var,2}]}}]

  sidejob:new_resource(bla, worker, 2) -> {ok, <0.2812.1>}
  sidejob_eqc:new_worker(1) -> <0.2817.1>
  sidejob_eqc:cast(<0.2817.1>) -> ok
  sidejob_eqc:get_status(<0.2817.1>) -> overload

  Reason: {postcondition, {overload, '/=', {working, 'Pid'}}}
[bug fix] Busy-loop in is_available.

When trying to call the last worker and the limit has been
reached is_available looped waiting for a ready worker.
Counterexample:
    [{set,{var,1},{call,sidejob,new_resource,[bla,worker,2]}},
     {set,{var,2},{call,sidejob_eqc,new_worker,[1]}},
     {set,{var,3},{call,sidejob_eqc,cast,[{var,2}]}},
     {set,{var,5},{call,sidejob_eqc,new_worker,[1]}},
     {set,{var,7},{call,sidejob_eqc,new_worker,[2]}},
     {set,{var,9},{call,sidejob_eqc,cast,[{var,5}]}},
     {set,{var,14},{call,sidejob_eqc,cast,[{var,7}]}},
     {set,{var,20},{call,sidejob_eqc,get_status,[{var,7}]}}]

    sidejob:new_resource(bla, worker, 2) -> {ok, <0.16905.0>}
    sidejob_eqc:new_worker(1) -> <0.16910.0>
    sidejob_eqc:cast(<0.16910.0>) -> ok
    sidejob_eqc:new_worker(1) -> <0.16911.0>
    sidejob_eqc:new_worker(2) -> <0.16912.0>
    sidejob_eqc:cast(<0.16911.0>) -> ok
    sidejob_eqc:cast(<0.16912.0>) -> ok
    sidejob_eqc:get_status(<0.16912.0>) -> blocked

    Reason: {postcondition, {blocked, '/=', overload}}
Test reorganization and crashing workers.

- cast starts worker and does get_status
- added crash command to crash a worker
[bug fix] Workers now reset their ets table entries on startup

Counterexample:

  [{set,{var,1},{call,sidejob,new_resource,[resource,worker,2]}},
   {set,{var,2},{call,sidejob_eqc,cast,[1]}},
   {set,{var,4},{call,eqc_statem,apply,[erlang,element,[2,{var,2}]]}},
   {set,{var,5},{call,eqc_statem,apply,[erlang,element,[2,{var,4}]]}},
   {set,{var,12},{call,sidejob_eqc,crash,[{var,5}]}},
   {set,{var,27},{call,sidejob_eqc,cast,[1]}},
   {set,{var,31},{call,sidejob_eqc,cast,[1]}}]

  sidejob:new_resource(resource, worker, 2) -> {ok, <0.29377.2>}
  sidejob_eqc:cast(1) -> {<0.29382.2>, {working, <0.29380.2>}}
  sidejob_eqc:crash(<0.29380.2>) -> ok
  sidejob_eqc:cast(1) -> {<0.29384.2>, {working, <0.29379.2>}}
  sidejob_eqc:cast(1) -> {<0.29385.2>, overload}

  Reason: {postcondition, {overload, '/=', {working, 'Pid'}}}
  false
  233> ets:tab2list(resource_ets).
  [{0,1},{1,1},{{full,1},1},{{full,0},1}]
Modelled supervisor restart limit.
Modelling new_resource/4
Modelling call/2.
Parallel testing (with and without PULSE)

No race conditions found :(
Test functions that take testing_time.
Simple test for sidejob_supervisor.
[bug fix] fixed sidejob_supervisor:spawn/4

Counterexample:
  [{set,{var,1},{call,sidejob,new_resource,[resource,sidejob_supervisor,1,1]}},
   {set,{var,7},{call,supervisor_eqc,work,[spawn_mfa,1]}}]

  sidejob:new_resource(resource, sidejob_supervisor, 1, 1) ->
    {ok, <0.19634.1>}
  supervisor_eqc:work(spawn_mfa, 1) -> timeout

  Reason: {postcondition, {not_pid, timeout}}
Fleshed out tests for sidejob_supervisor.

Testing which_children and having children terminate.
Ignore vim .swp files
Merge pull request #2 from Quviq/master
Enable EQC tests to run via eunit
Merge branch 'jdb-quviq'