Avoid unnecessary queries to DB.

Collect IDs from users to be removed and then removed the users and their metadata in single queries, instead of running two queries for every user. This is much faster and reduces memory consumption when you have big quantities of users that haven't been deleted previously.
Merge pull request #913 from andrezrv/av-master

Avoid unnecessary queries to DB.
Fixed 2 typos in database-template
Merge pull request #915 from JeffPyeBrook/pr-reactive-error-message

Fixed 2 typos in database-template
Add WPSC_Claimed_Stock class and functions.
Use WPSC_Claimed_Stock class and functions.
Use time constants introduced in WordPress 3.5
Follow WordPress coding standards for whitespace.
Allow wpsc_convert_time_interval_to_seconds() to handle minutes and years.
Add 'wpsc_stock_keeping_time' and 'wpsc_stock_keeping_interval' filters.
Add and use wpsc_get_stock_keeping_seconds() function with 'wpsc_stock_keeping_seconds' filter.
Move wpsc_convert_time_interval_to_seconds() to misc.functions.php
WPSC_Claimed_Stock::submit_claimed_stock() now accepts WPSC_Purchase_Log object or ID.
If WPSC_Claimed_Stock::submit_claimed_stock() arg is a WPSC_Purchase_Log object, convert to ID.
WPSC_Claimed_Stock class @since 3.8.14
Merge pull request #916 from benhuson/_bh_claimed_stock_class_2

WPSC_Claimed_Stock class and functions (v3)
Correcting image file extension

Note that there is a `grey-star.png` & a `gold-star.png` in `/wpsc-core/images/`, but not in `/wpsc-components/theme-engine-v1/templates/wpsc-images/`.
Merge pull request #917 from mrienstra/patch-1

Correcting image file extension
Small code fix

missing break on line
Fix test of global purchlogitem before using it